# Define all kind of parens: /* */, (), [], "", !() , {}
# with automatic positioning of the cursor
map c-/ `(/* */) left left left'
map `c-(' ``()' left'
map c-[ ``[]' left'
map c-" ``""' left'
map c-! ``!() 'left left'
map s-[ `last if x>1 right `{' firstnb downadd repeat 3 insline downadd `}' up left tab'
map sc-[ ``{}' left'
# Short for #include and #define
map A-/ `first insline `#include <>' left'
map A-* `first insline `#define ''
# main()-body
map s-nk7 `repeat 7 insline down first `int main (int argc, char *argv[])' first down down `{' down down left `} /* main () */' first up tab'
# insert a function WITH arguments but WITHOUT HEADER
map s-nk8 `repeat 7 insline down first ` ()' down down first `{' down left ping 9 down `} /* § */' findstr `\(' up prev first escimm (\`) wleft scanf %s findr § \$scanf findstr `)' prev escimm (\`) pong 9 tab'
# dito, but WITHOUT arguments
map s-nk9 `repeat 7 insline down first ` ()' down down first `{' down down left `} /* § */' findstr `\(' up prev first escimm (\`) wleft scanf %s findr § \$scanf first up tab'
# insert struct or union
map s-nk4 `repeat 5 insline down first `struct = {' left left left left escimm (\`) down down first tab `};' up left left'
map s-nk5 `repeat 5 insline down first `union = {' left left left left escimm (\`) down down first tab `};' up left left'
# insert switch, case or for
map s-nk1 `repeat 4 insline down `switch () {' left left left ping 9 escimm (\`) pong 9 scanf %s firstnb down down `} /* switch (' (\$scanf) ` */' firstnb up tab'
map s-nk2 `repeat 4 insline down `case () : {' left left left left left ping 9 escimm `\(' pong 9 scanf %s firstnb down down `break; } /* case (' (\$scanf) ` */' firstnb up tab'
map s-nk3 `repeat 4 insline down `for () {' left left left escimm (\`) firstnb scanf %[\\\^{] down down `} /* */' left left `\$scanf' firstnb up tab'
# insert if or if-else
map s-nk0 `repeat 4 insline down `if () {' left left left escimm (\`) firstnb scanf %[\\\^{] down down `} /* */' left left `\$scanf' firstnb up tab'
map s-nk. `repeat 6 insline down `if () {' left left left escimm (\`) firstnb scanf %[\\\^{] down down `} else {' down down repeat 8 left `} /* */' left left `\$scanf' firstnb up up up tab'
# insert do-while or while
map s-nk- `repeat 4 insline down `do {' firstnb down down `} while ();' left left escimm (\`) firstnb up tab'
map s-enter `repeat 4 insline down `while () {' left left left escimm (\`) firstnb scanf %[\\\^{] down down `} /* */' left left `\$scanf' firstnb up tab'